Skip to content

Make the WinDbg/TTD version a setting instead of downloading the latest (Fix #1130) - #1140

Merged
xusheng6 merged 5 commits into
devfrom
fix_1130_pin_windbg
Aug 14, 2026
Merged

Make the WinDbg/TTD version a setting instead of downloading the latest (Fix #1130)#1140
xusheng6 merged 5 commits into
devfrom
fix_1130_pin_windbg

Conversation

@xusheng6

@xusheng6 xusheng6 commented Jul 23, 2026

Copy link
Copy Markdown
Member

The latest WinDbg release (1.2606.22001.0) crashes the DbgEng TTD adapter on stop (#1129), so the installer no longer downloads whatever is newest.

Changes

  • New debugger.windbgVersion setting, defaulting to the validated 1.2603.20001.0. The installer downloads that version's MSIX bundle directly by URL.
  • Removed the update path: appinstaller manifest download/parsing, version comparison, the check-update command, and the GetWinDbgLatestVersion FFI/API.
  • The Install WinDbg/TTD dialog now compares the installed version against the setting and offers Install/Reinstall, with no online check.

To adopt a newer WinDbg once validated, bump kDefaultVersion in installer/windbg_version.h. Users can already install any other released version via the setting, without a new build.

…latest (Fix #1130)

The latest WinDbg release (1.2606.22001.0) crashes the DbgEng TTD adapter on
stop (#1129). The installer now downloads a pinned version (1.2603.20001.0)
directly by URL, and falls back to the latest version via the appinstaller
manifest if the pinned download fails.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@xusheng6
xusheng6 requested a review from plafosse July 24, 2026 17:06
@xusheng6 xusheng6 added this to the Krypton milestone Aug 11, 2026
@xusheng6 xusheng6 self-assigned this Aug 11, 2026
xusheng6 and others added 2 commits August 11, 2026 16:08
Since we install a pinned WinDbg version rather than the latest release, there is
nothing to check online. The latest-version query was reduced to returning a
compile-time constant, but it still went through a background thread, an FFI call
and a subprocess that spawned the installer CLI to parse its JSON output.

Worse, the check itself became wrong: IsVersionUpToDate() compared with >=, so a
user who already had the broken 1.2606.22001.0 installed - exactly the population
hit by #1129/#1130 - was told they were up to date and never offered the fix.

Remove GetLatestVersion(), IsVersionUpToDate() and CompareVersions() from the
installer library, the check-update CLI command and its exit code 2, the
core/FFI/API GetLatestVersion() plumbing along with the now-unused subprocess and
JSON helpers, and the dialog's async version fetch.

The pinned version moves to windbg_version.h so the UI can display it directly.
The dialog now compares the installed version against that constant and offers
Reinstall when they match and Install when they do not - not Update, since
replacing a newer WinDbg with the validated one is a downgrade.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Weitao-Sun

Copy link
Copy Markdown

Tested on Windows with both Binary Ninja Commercial and Ultimate (binaryninja_win64_5.4.10384-test_*).

Verified that the installer downloads the pinned WinDbg version (1.2603.20001.0) and falls back to the latest available version when the pinned version is unavailable.

xusheng6 and others added 2 commits August 14, 2026 12:26
…nload

The earlier commits on this branch pinned the version in a header but still kept the
old "download whatever Microsoft released last" path around as a fallback, which is a
lot of code for a path we do not want taken.

Replace both with a single `debugger.windbgVersion` setting:

- the installer takes `--windbg-version <ver>` and builds the MSIX bundle URL directly
  from it, defaulting to `kDefaultVersion` in the new installer/windbg_version.h
- the core passes the setting's value when it launches the installer, so a different
  released version can be installed without a new build
- the appinstaller manifest download, XML parsing and version comparison are gone,
  along with the `check-update` command and the `GetWinDbgLatestVersion` FFI/API
- the dialog compares the installed version against the setting instead of querying
  Microsoft in a background thread

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…nshot

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@xusheng6 xusheng6 changed the title Pin WinDbg/TTD version instead of always downloading latest (Fix #1130) Make the WinDbg/TTD version a setting instead of downloading the latest (Fix #1130) Aug 14, 2026
@plafosse

Copy link
Copy Markdown
Member

Discussed some findings in DM, nothing necessitates changes at the moment though.

@xusheng6

Copy link
Copy Markdown
Member Author

We will want to do #1177 now that we delete deprecated APIs

@xusheng6
xusheng6 merged commit 192f097 into dev Aug 14, 2026
1 check passed
@xusheng6
xusheng6 deleted the fix_1130_pin_windbg branch August 14, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants